home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / cd-sup / iconogfx / icons / useless / programs / initcd < prev    next >
AmigaDOS Script File  |  1998-05-24  |  5KB  |  155 lines

  1. .key arg
  2. .bra {
  3. .ket }
  4.  
  5. ; CUCD Init Script
  6. ;
  7. ; Set up assigns etc. both for users booting from the CD and from  HD
  8. ;
  9. ; Version 1.1 - Changed jpegtmp
  10. ;
  11. ; Version 1.2 - Added uninit option
  12. ;
  13. ; Version 1.3 - Added CHECK argument and link to Prefs editor
  14.  
  15. Assign CUCD: :
  16.  
  17. ; Make some commands resident to speed up things on CD32s in particular
  18. Resident >NIL: CUCD:C/RequestChoice PURE
  19. Resident >NIL: CUCD:rexxc/rx PURE
  20. Resident >NIL: CUCD:C/Version PURE
  21.  
  22. If {arg} EQ "CHECK"         ; Exit if InitCD has been run, otherwise ask
  23.     If $CDInit EQ TRUE
  24.         Skip END
  25.     Else
  26.         set init `CUCD:C/RequestChoice "CU Amiga CD" "InitCD needs to be run first*NWould you like to run it now?" "Yes|No"`
  27.         If $init EQ 0
  28.             Skip END
  29.             EndIf
  30.         EndIf
  31.     EndIf
  32.  
  33. If $CDInit EQ TRUE
  34.     If $CDBoot EQ TRUE          ; don't run UninitCD if booted from CD
  35.         CUCD:C/RequestChoice >NIL: "CU Amiga CD" "You do not need to run InitCD*Nwhen you have booted from the CD" "OK" 
  36.         Skip END
  37.         EndIf
  38.     set remass `CUCD:C/RequestChoice "InitCD" "You have already run InitCD once.*NDo you wish to remove the assigns and paths added before?" "Remove|Cancel"`
  39.     If $remass EQ 1
  40.         execute UnInitCD
  41.         EndIf
  42.     Skip END
  43.     EndIf
  44.  
  45. ; Set some system assigns
  46. Assign WWW:             CUCD:CUCD/WWW
  47. Assign GM:              CUCD:System/CDsupport/GMPlay ADD
  48. Assign CUCDNews:        CUCD:CUCD/Online/News
  49. Assign Twist:           CUCD:CUCD/Magazine/Issues
  50. Assign TwistIcon:       Twist:Icons
  51.  
  52. ; Add paths
  53. Path GM: ADD
  54.  
  55. ; Add MUI if no MUI installed.
  56. Assign MUI: EXISTS >NIL:
  57. IF WARN
  58.     Assign MUI:    CUCD:System/MUI
  59.     Assign Libs:   MUI:Libs ADD
  60.     Assign LOCALE: MUI:Locale ADD
  61.     Assign HELP: exists >NIL:
  62.     If NOT WARN
  63.         Dir >NIL: HELP:
  64.         EndIf
  65.     Assign HELP:   MUI:Docs ADD
  66.     EndIf
  67.  
  68. ; Set assigns and paths for programs on this CD
  69. Execute CUCD:S/ThisCD
  70.  
  71. ;BEGIN ClassAct
  72. CUCD:C/CAPrefs >NIL:
  73. ;END ClassAct
  74.  
  75. ; start arexx if not running
  76. CUCD:rexxc/rx "address command" >NIL:
  77. If WARN
  78.     CUCD:System/RexxMast >NIL:
  79.     EndIf
  80.  
  81. IF $CDBoot EQ TRUE
  82.     Run <NIL: >NIL: CUCD:C/NewIcons
  83.     CUCD:C/DefIcons
  84. Else
  85.     ; All this is only needed when not booting from the CD
  86.     Run >NIL: RequestChoice "InitCD" "Setting up some assigns and paths to run software from the CD.*NIf you wish to remove the CD from the drive, run InitCD again,*Notherwise the icon will stay on the Workbench." " OK "
  87.     Assign Fonts:   CUCD:Fonts ADD
  88.     Assign Libs:    CUCD:Libs ADD
  89.     Assign L:       CUCD:L ADD
  90.     Assign S:       CUCD:S ADD
  91.     Assign LIBS:    CUCD:Classes ADD
  92.     Path CUCD:C CUCD:System CUCD:System/CDsupport CUCD:Utilities CUCD:S CUCD:Rexxc ADD
  93.  
  94.     ; Make environment variables defined on CD available to system
  95.     Failat 21
  96.     Assign >NIL: ENV: CUCD14:Prefs/Env-Archive ADD
  97.     ; For HappyENV users
  98.     If FAIL     
  99.         Assign >NIL: ENVARC: CUCD14:Prefs/Env-Archive ADD  
  100.         EndIf
  101.  
  102.     ;Start NewIcons if not already running
  103.     If $NoNewIcons NOT EQ TRUE
  104.         CUCD:C/isnirunning
  105.         If NOT WARN
  106.             Run <NIL: >NIL: CUCD:C/NewIcons
  107.             CUCD:C/DefIcons
  108.             EndIf
  109.         EndIf
  110.  
  111.     ; Update workbench paths unless running Directory Opus 5.11 or 5.5 in WBR mode
  112.     Version >NIL: C:LoadWB 43
  113.     If WARN
  114.        C:LoadWB NEWPATH
  115.     Else
  116.         Version >NIL: C:LoadWB 60
  117.         If NOT WARN
  118.             C:LoadWB NEWPATH
  119.             EndIf
  120.         EndIf
  121.  
  122.     ; Check that libraries on boot drive are up to date
  123.     ;Execute CUCD:S/UpdateLibrary rexxdossupport.library 3 5
  124.     ;Execute CUCD:S/UpdateLibrary rexxreqtools.library  37 95
  125.     ;Execute CUCD:S/UpdateLibrary newicon.library 39 1
  126.     ;Execute CUCD:S/UpdateLibrary cando.library 3 8
  127.  
  128.     ; Give option for setting CD preferences
  129.     Version >NIL: version 37
  130.     If NOT WARN
  131.         set edit `RequestChoice "CU Amiga CD" "CUCD now has a preferences program to specify*N the tools used to view/hear different types of files.*NWould you like to run it now?" "Yes|No"`
  132.         If $edit EQ 1
  133.             cd CUCD:S
  134.             :RexxC/MuiRexx CUCDPrefs.mrx port CDPREFS
  135.         Else
  136.             RequestChoice >NIL: "CU Amiga CD" "You can run CUCD preferences at any time.*NIt is in the Prefs drawer of the CD" "OK"
  137.             EndIf
  138.     Else
  139.         If NOT EXISTS ENV:IDer.prefs
  140.             Copy >NIL: CUCD:S/IDer.prefs_OS2 ENV:IDer.prefs
  141.             EndIf
  142.         EndIf
  143.  
  144.     EndIf
  145.  
  146. SetEnv CDInit TRUE
  147.  
  148. LAB END
  149.  
  150. ; Remove commands made resident earlier
  151. Resident RequestChoice REMOVE
  152. Resident rx REMOVE
  153. Resident Version REMOVE
  154.  
  155.